// 引入 react 依赖
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Text, View, Image, TouchableOpacity, ImageBackground, ScrollView,InteractionManager } from 'react-native';

// 引入第三方依赖
import _ from 'lodash';
import pureRender from 'pure-render-decorator';
import { Actions } from 'react-native-router-flux';
import QRCode from 'react-native-qrcode-svg'

// antd 按需加载
import { Tabs, Toast } from '@ant-design/react-native';

// 引入 处理数据 所需文件
import { } from './module/module.js'

// 引入样式
import Style from './style/style.js';

// 引入公用组件
import { Status, NavBar } from '../../components/index.js'

// 引入专用组件
import { } from './components'

// 引入工具包
import { press, size, ScreenWidth , defaultDataList,onEndReached,onRefresh ,concatDataList,defaultPage} from '../../util/utils.js'
import { gx } from '../../util/images.js'

class Invite extends Component {

  componentDidMount() {

  }


  render() {
    return (
      <View style={Style.container}>
        <Status />
        <NavBar
          title="邀请好友"
          back={true}
        />
        <ScrollView style={[Style.content, {
          backgroundColor: '#2e7efb'
        }]}>
          <View style={{
            backgroundColor: '#4166fc',
            paddingTop: 30
          }}>
            <Image resizeMode='cover' style={{ width: ScreenWidth, height: size(504) }} source={gx} />
          </View>
          <View style={{
            flex: 1,
            paddingHorizontal: 30,
          }}>
            <View
              style={{
                borderRadius: 12,
                marginVertical: 15,
                overflow: 'hidden',
                backgroundColor: '#fff',
                padding: 15
              }}
            >
              <View style={{
                borderBottomWidth: .5,
                borderStyle: 'dashed',
                borderBottomColor: '#fff'
              }}>
                <Text style={{
                  fontSize: 16,
                  lineHeight: 20,
                  color: '#349cfd',
                  marginBottom: 15,
                  textAlign: 'center'
                }}>我的邀请码</Text>
                <Text style={{
                  fontSize: 28,
                  lineHeight: 32,
                  color: '#349cfd',
                  textAlign: 'center'

                }}>F5E6S588</Text>
              </View>
              <View style={{
                padding: 15,
                justifyContent: 'center',
                alignItems: 'center',
              }}>
                <QRCode
                  value={"This is a QR code string, string cannot be null"}
                  size={140}
                />
              </View>
            </View>

          </View>
        </ScrollView>
      </View >
    );
  }
}


export default connect(({ user }) => ({
  user,
}))(pureRender(Invite))
